-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Public Cache API and test #6550
Conversation
This API doesn't address the handling of the unexplained runtime exceptions due to file corruption/race conditions/multi process etc. But it raises a few things to consider
3 is a half baked idea, but how do we help clients be aware that something is broken? |
I'd love to figure out the definitive cause here. If it's multiple processes overlapping? I bet there's probably some patterns here we haven't considered to detect it, and then we'd need a strategy to recover if that happens. Perhaps not cache on the 2nd instance? Yuck. If it's multiple instances in the same process? We should probably detect this through a static variable and throw an exception? |
What about combining the processes and instances. An Android gist with a FileSystem that tries to enforce uniqueness by soft-locking on "appname:pid:instancecounter", and open and close write and delete the market file. Report by default, but optional fail on startup during dev?
|
@swankjesse are you for exposing this in 5.0? |
Yes! |
OK, holding off for approval. This change is just that minimal public API.
And a useful test with example logging that should be easy to build new integrating cases off. |
@swankjesse ping |
|
||
c.size(); | ||
|
||
assertThat(events).containsExactly("metadataOrNull:/cache/journal.bkp", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it.
Public API and test Public API and test Review comments Public API and test Public API and test Public API and test Review comments
Make Cache API public, and test capturing events.